{extend name="public/base"}
{block name='main'}
<!-- 主体开始 -->
<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md9">
      <div class="fly-panel" style="margin-bottom: 0;">
        <div class="fly-panel-title fly-filter">
          <a href="{:url('doc/doclist',array('id'=>$id, 'c' => 'newdoc'))}" class="{if $search_order == 'newdoc'}layui-this{/if}">按最新{if $search_order == 'newdoc'}<i class="layui-icon">&#xe61a;</i>{/if}</a>
          <span class="fly-mid"></span>
          <a href="{:url('doc/doclist',array('id'=>$id, 'c' => 'downdoc'))}" class="{if $search_order == 'downdoc'}layui-this{/if}">按下载{if $search_order == 'downdoc'}<i class="layui-icon">&#xe61a;</i>{/if}</a>
          <span class="fly-mid"></span>
          <a href="{:url('doc/doclist',array('id'=>$id, 'c' => 'hotdoc'))}" class="{if $search_order == 'hotdoc'}layui-this{/if}">按浏览 {if $search_order == 'hotdoc'}<i class="layui-icon">&#xe61a;</i>{/if}</a>
        </div>

        <ul class="fly-list">
          {mqcms:doc type="lists" cateid="$catearr" order="$order"  pagenum="20" }
            {empty name="data['list']"}
              <div class="fly-none" style="min-height: 800px;">没有相关数据</div>
            {/empty}
            {volist name="data['list']" id="vo"}
              <li>
                <a href="{:url('doc/doccon',array('id'=>$vo['id']))}" class="fly-avatar">
                  <img src="{:docfile($vo.html,$vo.imgurl)}" alt=""></a>
                <h2 class="mleft10"><a href="{:url('doc/doccon',array('id'=>$vo['id']))}">
                  <i class="ic ic-{$vo.ext|strtolower}"></i>{$vo.title}</a></h2>
                <div class="fly-list-info mleft10 ">
                  <p class="intro">{$vo.intro}</p>
                  <span>贡献者：{$vo.uid|getusername} </span>
                  <span>时间：{$vo.create_time|fdate}</span>
                  <span>浏览：{$vo.hits}</span>
                  <span>下载：{$vo.downnum}</span>
                </div>
                <div class="fly-list-badge">
                  <span class="layui-badge jifen">
                    {if $vo.score == 0}
                     免费
                    {else/}
                    {$vo.score}{:config('web_config.score_name')}
                    {/if}</span>
                  {if $vo.top == 1}
                  <span class="layui-badge zhiding">置顶</span>
                  {/if}
                  {if $vo.choice == 1}
                    <span class="layui-badge jinghua">精华</span>
                  {/if}
                </div>
              </li>
            {/volist}
          {/mqcms:doc}
        </ul>
        <div style="text-align: center">
          <div class="laypage-main">
            {$data['page']|raw}
          </div>
        </div>

      </div>
    </div>
    <div class="layui-col-md3">
      <!-- 右侧分类 -->
      <div class="fly-panel">
        <ul class="layui-nav layui-nav-tree layui-bg-cyan layui-inline layui-collapse" lay-filter="demo" lay-accordion>
          {volist name="cate" id="vo"}
            <li class="layui-nav-item layui-nav-itemed">
              <a href="javascript:;">{$vo.name}</a>
              <dl class="layui-nav-child">
                {volist name="vo.tcate" id="vo1"}
                  {if $vo1['id'] != 0}
                    <dd {if $vo1.id == $id}class="layui-this"{/if}>
                      <a href="{:url('doc/doclist',array('id'=>$vo1['id']))}">{$vo1.name}
                        <span class="layui-badge layui-bg-gray doclittag">{$vo1.id|catecount}</span>
                      </a>
                    </dd>
                  {/if}
                {/volist}
              </dl>
            </li>
          {/volist}
        </ul>
      </div>
      <!-- 右侧分类结束 -->

      <!-- 广告 -->

      {include file="public/flink" }

    </div>
  </div>

</div>
<!-- 主体结束 -->
<script>
  layui.config({
    version: "3.0.0"
    ,base: '__PUBLIC__/theme/blueideal/mods/' //这里实际使用时，建议改成绝对路径
  }).extend({
    fly: 'index'
  }).use('fly');
</script>
{/block}